#ifndef DEFINES_H_
#define DEFINES_H_

#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <fstream>
#include <cstring>
#include <string>
#include <vector>
#include <list>
#include <stdexcept>
#include <unordered_map>
#include <memory>

using namespace std;

#define PLUS        1
#define MINUS       2
#define TIMES       3
#define DIVISION    4
#define GREATER     5
#define LESSER      6
#define EQUAL       7
#define DIFFERENT   8
#define GTEQUAL     9
#define LEQUAL      10

#define OPERATOR    11
#define VALUE       12
#define INTEGER     13
#define FLOAT       14
#define ERROR       15

/*-----------------------------------------------------------------------------
 *  Tipo do token
 *-----------------------------------------------------------------------------*/
typedef int TokenType;

/*-----------------------------------------------------------------------------
 *  Valor de uma variável
 *-----------------------------------------------------------------------------*/
struct VarValue
{
    int type;
    int op;
    bool error;

    union
    {
        int ivalue;
        float fvalue;
    };
};

/*-----------------------------------------------------------------------------
 *  Argumento de uma lista de variáveis
 *-----------------------------------------------------------------------------*/
struct VarArg
{
    string name;
    int type;
};

/*-----------------------------------------------------------------------------
 *  Lista de variáveis
 *-----------------------------------------------------------------------------*/
typedef list<VarArg> VarList;

#endif /* DEFINES_H_ */
